SRC=$(wildcard *.cpp)
OBJ=$(patsubst %.cpp,%.o,$(SRC))
TARGET=libcommon.so
CPPFLAGS= -fPIC -g
LIBS=-lpthread
$(TARGET):$(OBJ)
	g++ -shared $+ -o $@ $(LIBS)

install:
	sudo cp $(TARGET) /usr/lib

uninstall:
	sudo rm /usr/lib/$(TARGET)

clean:
	rm $(OBJ)
	rm $(TARGET)